{% extends 'qa/base.html' %}
{% load bootstrap3 %}

{% block content %}
<div class="container">

  {% if registered %}
  <strong>注册成功!</strong>
  <a href="{% url 'login' %}">现在去登录!</a><br />
  {% else %}
  <h2>欢迎 加入!</h2><br /><br />

  <form id="user_form" class="form" method="post" action="/register/"
  enctype="multipart/form-data">

  {% csrf_token %}
  {% bootstrap_form user_form %}
  <!-- Display each form. The as_p method wraps each element in a paragraph
  (<p>) element. This ensures each element appears on a new line,
  making everything look neater. -->

    {% buttons %}
        <button type="submit" class="btn btn-primary">
            {% bootstrap_icon "star" %} 提 交
        </button>
    {% endbuttons %}
  </form>
  {% endif %}

</div>
{% endblock content %}


